﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using _2_BUL;
using _4_DAO;

namespace view
{
    public partial class NhanVienView : Form
    {
        public NhanVienView()
        {
            InitializeComponent();
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                NhanVien.NhanVienAddView frm;
                if ((Application.OpenForms["NhanVienAddView"] as NhanVien.NhanVienAddView) != null)
                {
                    Application.OpenForms["NhanVienAddView"].BringToFront();

                }
                else
                {
                    frm = new NhanVien.NhanVienAddView();
                    frm.Show();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void NhanVienView_Load(object sender, EventArgs e)
        {
            Reload();
        }

        private void Reload()
        {
            DGV_Result.DataSource = _2_BUL.NhanVienBUL.SellectAllNVLuongBUL();
        }
    }
}
